<?php include _include(ADMIN_PATH.'view/htm/header.inc.htm');?>
<div class="row">
	<div class="col-lg-10 offset-lg-1">
		<div class="card m-b-sm spanel">
			<div class="card-header">插件配置简介</div>
			<div class="card-block">
1、接口地址默认无需修改，留作不时之需，你懂得；<br>
2、TOKEN请前往官方获取，获取地址：<a href="http://www.tietuku.com/manager/createtoken" target="_blank">贴图库开放平台</a>；<br>
3、展示模板可用变量说明；<br>
1 #linkurl#：图片原图地址<br>
2 #s_url#：图片展示图地址<br>
3 #t_url#：图片缩略图地址<br>
<a href='http://www.baiup.com/thread-145.htm' target='_blank' class="btn btn-warning btn-block">觉得本插件不错的话快来打赏作者吧</a>
			</div>
		</div>


		<div class="card">
			<div class="card-block">
				<h4 class="card-title"><?php echo $header['title'];?></h4>
				<form action="<?php echo url("plugin-setting-ss_ttk-edit");?>" method="post" id="form">
					<div class="form-group row">
						<label class="col-sm-2 form-control-label">接口地址：</label>
						<div class="col-sm-10">
							<?php echo $input['api'];?>
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-2 form-control-label">开启HTTP上传：</label>
						<div class="col-sm-10">
							<?php echo $input['webup'];?>
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-2 form-control-label">开启FILE上传：</label>
						<div class="col-sm-10">
							<?php echo $input['fileup'];?>
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-2 form-control-label">展示框高度：</label>
						<div class="col-sm-10">
							<?php echo $input['height'];?>
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-2 form-control-label">文件上传秘钥：</label>
						<div class="col-sm-10">
							<?php echo $input['token'];?>
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-2 form-control-label">离线上传秘钥：</label>
						<div class="col-sm-10">
							<?php echo $input['urltoken'];?>
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-2 form-control-label">展示模板：</label>
						<div class="col-sm-10">
							<?php echo $input['tpl'];?>
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-2 form-control-label">简介：</label>
						<div class="col-sm-10">
							<?php echo $input['description'];?>
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-2 form-control-label">查找错误提示：</label>
						<div class="col-sm-10">
							<?php echo $input['finderr'];?>
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-2 form-control-label">网址错误提示：</label>
						<div class="col-sm-10">
							<?php echo $input['notabel'];?>
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-2 form-control-label">未输入网址提示：</label>
						<div class="col-sm-10">
							<?php echo $input['url_in'];?>
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-2 form-control-label">离线按钮名称：</label>
						<div class="col-sm-10">
							<?php echo $input['findimg'];?>
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-2 form-control-label">上传按钮名称：</label>
						<div class="col-sm-10">
							<?php echo $input['up'];?>
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-2 form-control-label">选择按钮名称：</label>
						<div class="col-sm-10">
							<?php echo $input['select'];?>
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-2 form-control-label">上传过程提示：</label>
						<div class="col-sm-10">
							<?php echo $input['uploading'];?>
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-2 form-control-label">上传失败提示：</label>
						<div class="col-sm-10">
							<?php echo $input['uploadfailed'];?>
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-2 form-control-label"></label>
						<div class="col-sm-10">
							<button type="submit" class="btn btn-primary btn-block" id="submit" data-loading-text="<?php echo lang('submiting');?>..."><?php echo lang('confirm');?></button>
							<a role="button" class="btn btn-secondary btn-block m-t-1" href="javascript:history.back();"><?php echo lang('back');?></a>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>

<?php include _include(ADMIN_PATH.'view/htm/footer.inc.htm');?>


<script>
var jform = $('#form');
var jsubmit = $('#submit');
jform.on('submit', function() {
	jform.reset();
	jsubmit.button('loading');
	var postdata = jform.serialize();
	$.xpost(jform.attr('action'), postdata, function(code, message) {
		if(code == 0) {
			$.alert(message);
			jsubmit.text(message).delay(3000).button('reset');
		} else if(code < 0) {
			$.alert(message);
			jsubmit.button('reset');
		} else {
			$.alert(message);
			jform.find('[name="'+code+'"]').alert(message).focus();
			jsubmit.button('reset');
		}
	});
	return false;
});
</script>